Better Type Errors#607
Conversation
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.3.6 to 5.4.1. - [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases) - [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md) - [Commits](NaturalIntelligence/fast-xml-parser@v5.3.6...v5.4.1) --- updated-dependencies: - dependency-name: fast-xml-parser dependency-version: 5.4.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…-parser-5.4.1' into better-type-guards
|
I just noticed that without updating |
# Conflicts: # devserver/src/components/Playground.tsx # devserver/src/components/controlBar/ControlBarClearButton.tsx # devserver/src/components/controlBar/ControlBarRefreshButton.tsx # devserver/src/components/controlBar/ControlBarRunButton.tsx # lib/modules-lib/src/tabs/AnimationCanvas.tsx # lib/modules-lib/src/tabs/AnimationError.tsx # lib/modules-lib/src/tabs/MultiItemDisplay/index.tsx # lib/modules-lib/src/tabs/PlayButton.tsx # lib/modules-lib/vitest.config.ts # src/bundles/curve/src/functions.ts # src/bundles/unittest/package.json # src/bundles/unittest/src/asserts.ts # src/tabs/ArcadeTwod/index.tsx # src/tabs/Curve/src/curve_3d_animation_canvas.tsx # src/tabs/Nbody/index.tsx # src/tabs/Pixnflix/index.tsx # src/tabs/Repl/index.tsx # src/tabs/UnityAcademy/index.tsx # yarn.lock
|
I am confident that there's some weird discrepancy with the way Typescript is working on local machines and Github Actions, but I honestly can't tell what's wrong. But I've put in workarounds in the meantime |
# Conflicts: # yarn.lock
…ype-guards # Conflicts: # yarn.lock
I would not be surprised; the frontend has a discrepancy between TS diagnostics in IDE vs when running |
|
I think this is done for now. Personally I think |
Better Type Errors
Some general fixes to things that got missed out in previous PRs. Also re-exports
js-slang's rttc (runtime type checking) utilities and exposes them to modulesthrow-runtime-errorIntroduces a linting rule as well to highlight whenever an error being thrown doesn't inherit from the RuntimeSourceError type.
Devserver Changes
Since
js-slangnow allows us to customize what importers are being used, the devserver can now be used without the modules server.copy_gcandmark_sweeprefactorI modernized those two modules to bring them up to date with module contexts and other design patterns. They are sorely lacking in documentation however, so I don't actually know if anything is broken.
noImplicitAnynoImplicitAnyhas been enabled for all bundles and tabs and only left disabled for modules (likeunity_academy) that simply don't leave enough context clues or documentation for me to be able to create types for them. I've fixed type errors wherever I can, but a lot of bundles don't have tests so it's not always clear if any kind of functionality has been affected.